<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>积分兑换</title>
<meta name="decorator" content="default" />
<meta name="full-screen" content="yes">
<meta name="viewport"
	content="width=device-width initial-scale=1.0  maximum-scale=1.0">

<jsp:include page="/static/member/themes/default/header.jsp" />

<script type="text/javascript">
		
		
		$(document).ready(function() {
			setValues();
			
		});
		
		function setValues(){
			var value = $('#product').val();
			var varlueArray = value.split("-");
			$('#exchangeId').val(varlueArray[0]);
			$('#score').val(varlueArray[1]);
			$('#proName').val(varlueArray[2]);
		}
		
		
	</script>
	
	<style type="text/css">
.border_red{ border-bottom:2px solid #ef4377;}
.border_red_1{ border-bottom:1px #ef4377 solid; margin:1em;}
.t_a_c{ text-align:center;}
.p10{ padding:1em;}
.pic{width:7em; height:7em;}
.pic img{width:7em; height:7em;}
.pic_td{width:7em;}
.plh{ line-height:150%;}
.red{ color:#ef4377;}
.fz12{ font-size:1.2em;}
.pb10{ padding-bottom:1em;}
.border_b{ border-bottom:1px solid #e1e1e1; margin:0.5em 0;}
	
	</style>
</head>


<body>
	<div class="main">
		<div>
			<div>
				<div class="ztContent">

					<c:if test="${uid eq '34' }">
						<div class="c2"></div>
						<p style="font-size: 18px; color: red">
							<b>${config.notice }</b>
						</p>
					</c:if>

				</div>

				<div id="city">
					<ul class="csList" >
						<li><strong><font size="2">您当前的活动积分：</font><span  style="font-size:16px; color:#CC0000; font-family:Arial;">${wechatMember.activeScore/1000 }</span></strong></li>
					</ul>
				</div>
				
                    
            </div>
        </div>
        
        <div  data-role="page"  data-theme="a">
            
            <div  data-role="content">
                <p  class="plh pt10 red fz12 t_a_c pb10">
                    积分礼品列表，按规则达到积分即可兑换
                </p>
                <div  class="border_red"  style="margin-left: 0.8em; margin-right: 0.8em;">
                </div>
                <div  class="t_a_c"  style="margin-top: -2px;">
                    <img  src="${ctxStatic}/member/themes/ShiShangHong/images/img_jian.png">
                </div>
                <div  class="t_a_c">
                    <img  src="${ctxStatic}/member/themes/ShiShangHong/images/img_lip.png"  width="140"  height="71"  style="width: 7em; height: 3.5em;">
                </div>
                <div  class="p10"  id="product_list">
                <c:forEach items="${scoreExchangeList}" var="scoreEx">
                
               <form id="inputForm" action="${ctxFront}/member/toexchangepro" method="post" >
               
               
							<input type="hidden" name="uid" value="${uid }" /> 
						
							<input	type="hidden" name="wechatId" value="${wechatId }" />
							<input	type="hidden" name="ScoreExchangeId" value="${scoreEx.id}" />
							<input	type="hidden" name="style" value="${style}"/>
                
                    <div  style="position: relative"  pid="4560">
                       
                            <table  width="100%"  border="0"  cellspacing="0"  cellpadding="0">
                                <tbody><tr>
                                    <td  align="left"  class="pic_td"  rowspan="3">
                                        <div  style="position: relative;">
                                            <div  class="pic">
                                               
                                                    <img   src="${ctxUser}/score/${scoreEx.showPic}" onerror="this.src='${ctxStatic}/images/zanwutupian.jpg'">
                                               
                                            </div>
                                       
                                        </div>
                                    </td>
                                    <td  colspan="2">
                                    
                                      
                                            <span  class="plh"><font  color="black">${scoreEx.name }</font> </span>
                                       
                                       
                                    </td>
                                    
                                    
                                </tr>
                                <tr>
                                    <td  align="left"  valign="top">
                                      
                                          <br>兑换积分：<font  color="#CC0000">${scoreEx.score/1000}</font>
                                       
                                    </td>
                                </tr>
                                
                                 <tr>
                                    <td  align="left"  valign="top">
                                      
                                        <input id="btnSubmit" class="btn btn-danger" type="submit"
										value="兑换" />
                                       
                                    </td>
                                </tr>
                            </tbody></table>
                       
                    </div>
                    <div  class="border_b">
                    </div>
                   </form>
                    </c:forEach>
            </div>
        
        

				<!--  
				<div class="ztContent">
						<form id="inputForm" action="${ctxFront}/member/doexchange/${uid}" method="post" onsubmit=" return checkForm();">
							<input type="hidden" name="action" value="reg" /> 
							<input	type="hidden" name="topage" value="${topage }" />
							<input	type="hidden" name="wechatId" value="${wechatId }" />
							<input	type="hidden" name="proName" id="proName"/>
							<input	type="hidden" name="exchangeId" id="exchangeId"/>
						<input	type="hidden" name="style" value="${style}"/>
							<div align="center">
								<div class="control-group">
									<div class="controls" align="left">
										选择商家:&nbsp;&nbsp;
											<select name="seller">
											<option value="一元租车">一元租车</option>
										</select>
									</div>
								</div>
								
								<div class="control-group">
									<div class="controls" align="left">
										选择商品:&nbsp;&nbsp;
										<select id="product" name="product" onchange="setValues()">
											<c:forEach items="${scoreExchangeList }" var="scoreEx">
												<option value="${scoreEx.id }-${scoreEx.score }-${scoreEx.name }">${scoreEx.name }</option>
											</c:forEach>
										</select>
									</div>
								</div>
								
								<div class="control-group">
									<div class="controls" align="left">
										兑换分值:&nbsp;&nbsp;
										<input name="score"  type="text" id="score"
											maxlength="50" class="required" />
									</div>
								</div>
								
								<div   align="center">
									<input id="btnSubmit" class="btn btn-danger" type="submit"
										value="确 定 " />
								</div>
							</div>
						</form>				
				</div>-->
			</div>
		</div>
	</div>

	<c:if test="${uid ne '34' }">
		<jsp:include page="/static/member/themes/default/footer.jsp">
			<jsp:param value="${uid }" name="uid" />
		</jsp:include>
	</c:if>

</body>
</html>
